package com.wsq.animation.animation;

import android.animation.TimeInterpolator;
import android.util.Log;

/**
 * Date:2022/5/6
 * Time:2:48
 * author:wushengqi
 *
 * 自定义插值器
 */
public class MyInterpolator implements TimeInterpolator {


    /**
     * Maps a value representing the elapsed fraction of an animation to a value that represents
     * the interpolated fraction. This interpolated value is then multiplied by the change in
     * value of an animation to derive the animated value at the current elapsed animation time.
     *
     *
     * @param input A value between 0 and 1.0 indicating our current point
     *              in the animation where 0 represents the start and 1.0 represents
     *              the end
     *
     *              在0和1.0之间的值，表示当前的时间进度，用户可以根据时间进度计算属性值，并返回。
     * @return The interpolation value. This value can be more than 1.0 for
     * interpolators which overshoot their targets, or less than 0 for
     * interpolators that undershoot their targets.
     *
     *
     * 该方法每一个绘制周期（1000ms/60(帧率)）内被调用一次
     */
    @Override
    public float getInterpolation(float input) {
        Log.e("插值器变化", "input:" + input);
        return input;
    }
}
